var strElt = "ELT_TESTU"+$.functionsLib.getMilise();
var keyScenard = "";

test( "createElement", function() {
    var tabSetting = { };
    var tabInput = {
        key : strElt,
        lang : 'EN',
        userId : 1,
        content : 'My content',
        type : 'TEXT',
        description : 'a element create by test U js'
    };
    var retour = $.functionsLib.callRest(domaine+"phpsql/createElement.php", tabSetting, tabInput);
    ok((retour["data"]["id"] != '0'), "Test OK : Passed! (strElt : "+strElt+", id : "+retour["data"]["id"]+")" );
});

test( "getListScenario", function() {
    var tabSetting = { };
    var tabInput = { };
    var retour = $.functionsLib.callRest(domaine+"phpsql/getListScenario.php", tabSetting, tabInput);
    keyScenard = retour["data"]["resultat"]["data"][0]["key"];
    ok((keyScenard != ''), "Test OK : Passed! (1rst Scenario : "+keyScenard+")" );
});

test( "buildSomm", function() {
    var tabSetting = { };
    var tabInput = { keyScenar : keyScenard};
    var retour = $.functionsLib.callRest(domaine+"phpsql/buildSomm.php", tabSetting, tabInput);
    ok((retour["strErreur"] == ''), "Test OK : Passed!" );
});